

n = int(input("请输入一个数字:"))

list = [[0 for _ in range(n)] for _ in range(n)]

for i in range(n):
	index = 1
	for j in range(n-i):
		list[i][j] = index
		list[n-i-1][n-j-1] = index
		if index < i+1 :
			index += 1

for i in range(n):
	for j in range(n):
		print(f"{list[i][j]}  ",end="")
	print()

